home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: ** Disabling ctrl-C in C **
- Date: 15 Mar 1996 20:41:49 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4idgqdINNopn@keats.ugrad.cs.ubc.ca>
- References: <4hpbv3$6u@maltese.eag.unisysgsg.com> <31435190.45C2@post.drexel.edu> <826935500snz@genesis.demon.co.uk>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <826935500snz@genesis.demon.co.uk>,
- Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
-
- >>ioctl (0,TCSETAF, &termnew); /*terminal now ignores signals*/
-
- By the way he surely meant to say /*terminal driver now doesn't generate sigs*/
-
- Nothing is ignored; signals simply not generated anymore.
-
- >>if (ioctl (0,TCSETAF,&term_init); /*sets terminal back to initial conditions*/
- >
- >That seems an excessively long-winded and non-portable way of writing:
- >
- >#include <signal.h>
- >
- > signal(SIGINT, SIG_IGN);
-
-
- >:-)
-
- Not to mention that the ioctl(.. TCSETAF...) style of terminal control is
- completely obsoleted by POSIX.1.
-
- The proper way is tcgetattr()/tcsetattr().
-
- This is must be available on any system that claims POSIX compliance.
-
- Off topic. Sigh.
- --
-
-